home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / oleo-1_4.lha / oleo-1.4 / USING < prev    next >
Text File  |  1993-03-26  |  38KB  |  1,037 lines

  1.  
  2.             How to Use Oleo
  3.  
  4. This is a brief description of Oleo.  It is not a good introduction to
  5. spreadsheets in general.  We hope to provide more complete
  6. documentation in the future.
  7.  
  8.  
  9.         Cell references:
  10.  
  11. The case of cell and range letters is ignored.  Lowercase letters in
  12. cell and range letters are silently turned into their uppercase
  13. equivelents.
  14.  
  15.     Absolute vs Relative references:
  16.  
  17. A reference to a cell may be either absolute or relative.  The only
  18. difference between them (besides how they are printed) is how they are
  19. adjusted when a cell is moved or copied.
  20.  
  21. When an expression containing an absolute reference is moved or copied, the
  22. reference will still point to the same cell.
  23.  
  24. When an expression containing a relative reference is moved or copied, the
  25. reference is changed to point to the cell at the same offset from the
  26. reference's new position.
  27.  
  28. So if the expression 'R[+1]C[+1]' is in cell R8C9 it refers to cell R9C10.
  29. If the same expression is copied into cell R1C1 it will refer to R2C2.
  30.  
  31.  
  32.     Address Syntax:
  33.  
  34. Oleo supports two syntaxes for cell address, called `a0' and `noa0'.
  35. To switch between these syntaxes, use the set-option command.
  36.  
  37.     M-x set-option a0
  38.     M-x set-option no a0
  39.  
  40.  
  41.     In 'noa0' mode: (the default)
  42.  
  43. Absolute cell references have the form R{row_num}C{col_num}, as in R1C1 (the
  44. topleft cell in the sheet).
  45.  
  46. Relative ones have the form R[{offset}]C[{offset}], as in R[-1]C[+1] (The
  47. cell above and to the right of the current cell).  An offset of zero, can be
  48. deleted, along with its square-brackets, as in RC[+1] (the cell to the right
  49. of the current cell.)
  50.  
  51. Mixed-mode references also work about the same as you'd
  52. expect, as in R4C[-1] (the cell in row four that's one left
  53. of the current cell.)
  54.  
  55. Ranges are of the form R{row1}:{row2}C{col1}:{col2}, where the row and
  56. column references may be either absolute or relative.  If
  57. {row2}=={row1} or {col2}=={col1}, the colon and the redundant number
  58. may be omitted, as in R1:10c2 (Rows one through ten in column two).
  59.  
  60. Mixed-mode rangers work, and have the syntax you'd expect, as in R2:[-1]c3.
  61.  
  62.  
  63.     In 'a0' mode:
  64.  
  65. Relative cell reference have the form {col_let}{row_num}, as in A1 (the
  66. topleft cell in the sheet).
  67.         
  68. Absolute ones have the form ${col_let}${row_num}, as in $A$1 (The topleft
  69. cell in the sheet).
  70.  
  71. Mixed-mode ones work about the way you'd expect, with $A1 having an absolute
  72. column, but a relative row. . .
  73.  
  74. Ranges are either {cell_ref}:{cell_ref} or {cell_ref}.{cell_ref}, where the
  75. cell_refs describe opposite corners of the range.  So A1:B2 is the topmost,
  76. leftmost four cells in the spreadsheet.
  77.  
  78. Mixed mode rangers work, and have the syntax you'd expect, as in '$A3.$F9.
  79.  
  80.  
  81.  
  82.         Keymaps:
  83.  
  84. Keymaps may have a 'default map'.  If a key is pressed which does not have an
  85. assigned meaning in that map, the map's default map is checked, and that
  86. map's default map, until a command is found or there are no more default maps
  87. to scan.
  88.  
  89. Here is a list of keymaps, and the keymaps to which they default:
  90. Oleo normally has five keymaps.  They are:
  91.  
  92.    KEYMAP (DEFAULT)         USE
  93.   universal            The root of all keymaps.
  94.   help (universal)        Help commands.
  95.   mouse (universal)        Bindings for mouse buttons.
  96.   navigate (universal)        Commands that move the cursor.
  97.   trolx-navigate (universal)    Navigate commands prefixed by ^X.
  98.   meta-navigate (universal)     Navigate commands prefixed by ESC.
  99.   main (navigate)        The default keymap.
  100.   trolx (trolx-navigate)    Default ^X commands.
  101.   meta (meta-navigate)        Default ESC commands.
  102.   digit (main)            The numeric prefix keymap.
  103.   edit (universal)        The keymap for edditting in the input area.
  104.   meta-edit (universal)          Edit commands prefixed by ESC.
  105.   trolx-edit (universal)    Edit commands prefixed by ^X.
  106.   ansi (universal)        A keymap for ANSI arrows keys.
  107.  
  108.  
  109. The command write-keys can be used to produce a listing of
  110. keybindings.  Also, the source file init.c lists the default bindings.
  111.  
  112.  
  113.         Input Editing:
  114.  
  115. When the spreadsheet is reading text input, you can use a few
  116. text-editing commands.  Note that there in no history mechanism and no
  117. yank command.  If you accidentally ^U your text, it is *gone*.
  118. This will be improved in the future.
  119.  
  120. While the input area is active, the commands that move the cell cursor
  121. are disabled.  If you want to move the cell cursor, use the
  122. other-window command (^X-o) to leave and later reenter the input area.
  123.  
  124. The following editing commands are defined:
  125.  
  126. Name:        Key:    What it does:
  127.  
  128. M-A    insert-abs-ref        Insert/over-write an absolute reference to the
  129.                 current cell/region.
  130. M-R    insert-rel-ref        Insert/over-write a relative reference to the
  131.                 current cell/region.
  132. M-E    insert-cell-expression    Insert/over-write the expression in the
  133.                 current cell.
  134. M-V    insert-cell-value    Insert/over-write the value of the current
  135.                 cell.
  136. ^A    cursor-begin-line    Move the cursor to the beginning of the text.
  137. ^B    cursor-back-char    Move the cursor back a character.
  138. M-B    cursor-back-word    Move back a word.
  139. ^D    delete-next-char    Delete the character under the cursor.
  140. M-D    delete-next-word    Delete from the cursor to the end of
  141.                 the current word.
  142. ^E    cursor-end-line        Move to the end of the text.
  143. ^F    cursor-fwd-charF    Move forward a character.
  144. M-F    cursor-fwd-word        Move forward a word.
  145. ^H  ^?    delete-prev-char    Delete the character to the left of the cursor.
  146. ^J  ^M    finish-line        Finish editing the text, and execute the
  147.                 command you've been typing the text in for.
  148. ^K    delete-to-end        Delete from the cursor to the end of the text.
  149. M-O    toggle-over-write    Toggle between overwrite and insert mode.
  150. ^U  ^X    delete-to-start        (BEWARE!) Deletes from the cursor to the
  151.                 beginning of the line.
  152. ^W    delete-prev-word    Delete the word to the left of the cursor.
  153. ' ' to ~ self-insert        These characters are either inserted or
  154.                 over-written into the text.
  155. ^X-O    other-window        Move the cursor into the cell area.
  156.  
  157.         Input Defaults:
  158.  
  159. Almost all editing commands remember what you typed the last time you used
  160. that command, and start you up editing a copy of that text.  If you want to
  161. type in something completely new, just type ^X (or ^U) and type in your new
  162. text.
  163.  
  164.  
  165.             Error Messages:
  166.  
  167. Error messages are displayed on the input line.  If oleo needs to display
  168. more than one error message at a time, it will display [MORE] at the end of
  169. the first msg, and will wait for you to type a key before displaying the next
  170. one.  Oleo will also display the [MORE] message if you are entering text in
  171. the input line, so that you will be able to see the error message.  
  172.  
  173.             Info Messages:
  174.  
  175. Some commands (like format-cell) occasionally display non-error information.
  176. If the status line is enabled, the message is displayed there, and subsequent
  177. non-error messages will over-write them without [MORE] prompting.  This in
  178. quite useful if the msg in question concerns how far oleo has gotten through
  179. some task (like reading a file).  If the status line is disabled, the
  180. messages are displayed in the input line.
  181.  
  182.             The Main Commands:
  183.  
  184. Key    Command Name        What it does
  185. h  ^B    go-left        These commands move the cell-cursor one cell
  186. j  ^N    go-down        in the appropriate direction.  
  187. k  ^P    go-up
  188. l  ^F    go-right
  189. y    go-upleft
  190. u    go-upright
  191. b    go-downleft
  192. n    go-downright
  193.  
  194. H ^X-<    scroll-left        These scroll the current window one screenful
  195. J M-v    scroll-down        in the appropriate direction.  They try to
  196. K ^V    scroll-up        leave the cell cursor in (roughly the same
  197. L ^X->    scroll-right        place in the window, so that an L followed by
  198. Y    scroll-upleft        an H will leave the cell cursor back in the
  199. U    scroll-upright        original cell, however, since the number of
  200. B    scroll-downleft        rows and columns in each screenful varies,
  201. N    scroll-downright    this will not always work.
  202.  
  203. M-H M-b    scan-left    These commands move to the first/last nonempty cell in
  204. M-J M-n    scan-down    the current row/column.  If given a repeat count, they
  205. M-K M-p    scan-up        go to the N-th most nonempty cell.  If there are no
  206. M-L M-f    scan-right    cells, the cursor is moved to the leftmost/top cell.
  207.  
  208. ^G    break    This will abort a partially completed command.  If you are
  209.         typing text on the top line, the text you typed will be saved
  210.         and presented as the default the next time you start that
  211.         command.
  212.  
  213. ^L    recenter-window        This redraws the screen.  If the page option
  214.         is not set in this window, it will try to move the current
  215.         cell to the center of the window.  If the page option is set,
  216.         this will just redraw the screen.
  217.  
  218. o    set-option    This asks for an option to set or reset, and tries to
  219.         do so.
  220.  
  221.  
  222. d    set-defaults    This command will change the default alignment, format,
  223.         protection, or width.  If the status-line is enabled,
  224.         this will display the current settings there.
  225.  
  226. Q    quit    This command exits the spreadsheet and returns you to the
  227.         shell.  This may ask for confirmation if oleo thinks you have
  228.         unsaved changes.  If you do not save your changes before
  229.         quitting, they will be lost forever.
  230.  
  231. ^R M-^l    redraw-screen    This redraws the screen.  It is most useful if
  232.         line-noise or another program has scribbled on your display.
  233.                 
  234.  
  235. M-U    set-user-format        Set a user-defined format.
  236.  
  237. v    set-variable    This prompts you for a name followed by a cell or
  238.         range that you want to refer to by that name.  To
  239.         'undefine' a variable, use set-variable with just its
  240.         name.
  241.  
  242. V    show-variable
  243.  
  244. ^V    show-all-variables    This shows the values of all currently defined
  245.         variables.
  246.  
  247. !    recalculate     Recalculate the spreadsheet until all the cells whose
  248.         values may have changed have been evaluated.  If there are
  249.         circular cell references, the cells in the loop will be
  250.         evaluated at most 40 times (this number subject to change!)
  251.  
  252. :    bind-key  This asks for the name of a keymap followed by a
  253.         command name and a key to bind it to.  If the 'command' you
  254.         give is a cell or region in the spreadsheet, it is taken as a
  255.         macro, and bound to the key you specify.
  256.  
  257. ;    describe-key    Have the user press a key, and then describe
  258.         what function that key is bound to.
  259.  
  260. M-<    read-commands    This command opens the file you specify reads in each
  261.         line, and executes them as if you'd typed them in to
  262.         execute-command.  If any command needs more arguments than are
  263.         included on the line, it will prompt you (interactively) for
  264.         the missing information.
  265.  
  266. M->    write-keys    Write a list of commands to the file that, when
  267.         executed with read-commands, will return the keymaps to their
  268.         current state.
  269.  
  270. w ^x^s        Save the spreadsheet to a file, using the current
  271.         file-format.
  272.  
  273. r ^x^v    visit-spreadsheet    Read in a file in the current
  274.          file-format.  This erases the current contents of the
  275.         spreadsheet first.  This may ask for confirmation.
  276.  
  277. R ^x^i    merge-spreadsheet
  278.         Read in a file and merge its contents into the
  279.         current spreadsheet.  Note that some file-formats, (like
  280.         panic-save) won't work with this command.
  281.  
  282. ^X-DEL    clear-spreadsheet
  283.         Delete the entire spreadsheet.  This may ask
  284.         for confirmation if oleo thinks you may be about to lose
  285.         un-saved work.
  286.  
  287. c    copy-region    Copy a region.  Takes two ranges, copies the source
  288.         range into the dest range.  If the dest range size is a
  289.         multiple of the source range size, the source range is copied
  290.         multiple times.  If the dest range is given as a cell, the
  291.         cell is the location of the top-left corner of the dest range.
  292.  
  293. C    copy-values-in-region    Copy just the values of one region to another.
  294.  
  295. F    format-region    Change the format, alignment, protection,
  296.         or width of a region.  If the status line is active, oleo
  297.         will display the current alignment, format, width and
  298.         protection of the top-left cell in the region.
  299.  
  300. m    move-region    This is similar to copy-region, except that the two
  301.         ranges must be the same size, and that cells that reference
  302.         the source region may be modified to reference the dest
  303.         region instead.  (absolute references are modified, relative
  304.         ones aren't.)  Variables whose ranges are inside the source
  305.         region are also adjusted.
  306.  
  307. p    print-region    Print a region to a file.  Asks for a region
  308.         (to print) and a filename to to write to.
  309.  
  310. s    sort-region    Sort a region.  This takes the region to sort, a
  311.         region that is the first element of the region, and a list of
  312.         cells that are to be used as the sorting-keys.  Here's an
  313.         example.  sort-region r1:100c1:10 r1:2c1:10 +r1c2 -r1c3 This
  314.         means: Sort the region R1:100C1:10 in two-row, ten-column
  315.         chunks, sorting on the cell that's in the top-row
  316.         one-column-in.  If they are similar, use the cell in the
  317.         top-row two-columns-in, with high values ending up before low
  318.         ones.
  319.  
  320. ^x-w    write-region-to-file    Write a region of the spreadsheet to a file.
  321.         This command is not allowed with some
  322.         file-formats (like panic-save).
  323.  
  324. X    delete-region    Delete {value, formula, format, etc} of a
  325.         region.  This DOES NOT ask for confirmation.
  326.  
  327. M-(    start-entering-macro    Start storing a keyboard macro.  Keyboard
  328.         macros are strings that contain the characters you typed.
  329.  
  330. M-)    stop-entering-macro    Finish a keyboard macro, and store it in a
  331.         cell that you specify.
  332.  
  333. M-X    execute-command        This will allow you to execute either a
  334.         builtin command, or a macro.  For a builtin command, simply
  335.         enter the command's name (and, optionally, any arguments the
  336.         command will want).  For a macro, enter its name, or
  337.         the region in the spreadsheet that contains it.
  338.  
  339.         You can create macros with text strings.  Command names may
  340.         be enclosed in {CMD}, as in {go-left}.  Some commands may
  341.         take arguments, as in {go-up 12} or {goto-cell r1c3}.  To
  342.         execute multiple commands, concatenate them.  Other
  343.         characters are taken as keystrokes, and act exactly as if you
  344.         had typed them.
  345.  
  346.         When the spreadsheet is executing a macro, it stops when
  347.         1) It encounters an empty cell, or one which is not a string,
  348.            or which is the empty string "".
  349.         2) an error occurs while trying to parse a command name, or a
  350.            command's arguments.
  351.         3) All the cells in the region have been executed.
  352.  
  353.         The top-left cell in a region is executed first, then the one
  354.         below it, down to the bottom cell in the macro, then the one
  355.         to the right of the top-left cell, down to the bottom cell in
  356.         that column, etc. . .
  357.  
  358.         Macros may execute other macros.
  359.  
  360. g ^xg    goto-cell    Asks for a cell to go to, and moves the cell cursor
  361.         there.  The cell can be either a cell name as in 'R32C96',
  362.         or a variable.  This command starts with a default of
  363.         wherever the cursor was the last time this command was used.
  364.         If you type a range, the cursor is placed in the top-left
  365.         corner of the range, and the cell-mark is placed at the
  366.         opposite corner of the region.
  367.  
  368. ^@    mark-cell    Mark one corner of a rectangular region to use for
  369.         the next command.  (The cell cursor marks the other corner.)
  370.         You can use this while a command is prompting you for a
  371.         region by moving to one corner, typing ^@, moving to the
  372.         other corner, and hitting <RETURN>.
  373.  
  374. e    edit-cell    Edit the formula of the current cell.
  375.  
  376. E    edit-value-cell        Edit the value of the current cell.  Using
  377.         this command will replace the current cell's formula with a
  378.         constant expression.
  379.  
  380.  
  381. f    format-cell    Change the format, alignment, or protection of the
  382.         current cell, or the width of the current column.  If the
  383.         status line is enabled, the current alignment, format,
  384.         protection, and width will be displayed there.
  385.  
  386. x    delete-cell    This deletes the (value, formula, format, etc) of the
  387.         current cell.  To delete just the value and formula, use
  388.         <space><return>.
  389.  
  390. =    edit-cell-with-default    Enter a formula for the current cell with the
  391.         default text of the last formula you typed.
  392.  
  393. M-0    digit-0        Repeat the next command [digits] times.
  394. M-1    digit-1        You can type multiple digits, as in
  395. M-2    digit-2        M-1 0 0 j
  396. M-3    digit-3        which will go down 100 cells.  This command uses the
  397. M-4    digit-4        digit-map so that you the second and subsequent digits
  398. M-5    digit-5        do not need to be meta-ized.
  399. M-6    digit-6
  400. M-7    digit-7
  401. M-8    digit-8
  402. M-9    digit-9
  403.  
  404. 0-9    enter-text-in-cell    Enter a new formula that begins with the
  405.         character typed.  Note that this blows away whatever was
  406.         saved as a default from the last time you entered a formula.
  407.  
  408. O    show-options    This shows the current state of all the spreadsheet
  409.         options, and also shows the current definitions for all the
  410.         user-defined variables.
  411.  
  412. ^X-2    split-window-vertically
  413. ^X-5    split-window-horizontally
  414.         These commands divide the current window in half.
  415. ^X-0    delete-window
  416.         Delete the current window.
  417. ^X-1    delete-other-windows
  418.         Delete all but the current window.
  419. ^X-o    other-window
  420.         Move to the next window.  Repeated, this will visit
  421.         all the windows.
  422.  
  423. M-W    open-window    This command takes a line beginning with the letter
  424.         'h' (for horizontal), or 'v' (for vertical), followed by the
  425.         number of lines/columns to leave in the current window.
  426.         The cell cursor is placed in the new window.
  427.  
  428. M-C    close-window    This takes the number of a window to close, and makes
  429.         it go away.  The surrounding window(s) expand to fill the
  430.         space the window occupied.
  431.  
  432. M-G    goto-window    This takes the number of a window to go to, and
  433.         places the cell-cursor in that window.
  434.  
  435. Oleo uses the character ^\ to prefix mouse commands.  The default
  436. bindings in the mouse map are:
  437.  
  438. 0    mouse-goto
  439.     Move to the pointed to cell.
  440. 1    mouse-mark
  441.     Mark the pointed to cell without moving.
  442. 2    mouse-mark-and-goto
  443.     Mark the current cell, and move to the pointed to cell.
  444.  
  445. The numbers correspond to X button numbers (usually 0 is the leftmost
  446. button on the mouse).
  447.  
  448.         Displaying Cell Contents:
  449.  
  450. If a cell contains a number or string that takes more characters than the
  451. width of the cell to display, the display may slop over into the cell(s) to the
  452. right.  This does not affect the slopped over cells in any way.  Only cells
  453. that are empty, or have their format set to hidden, will be slopped over.
  454.  
  455. If there isn't room to display a number, a series of '#', will appear in the
  456. cell.
  457.  
  458. If there isn't room to display any other value, only the characters that fit
  459. (less one, so there'll be a space separating cells) will be displayed.
  460.  
  461.         Numeric formats:
  462.  
  463. Oleo can display numbers in a variety of formats.  In addition to the sixteen
  464. user-defined formats, you can use:
  465.  
  466. integer        The number is rounded to an integer before being displayed.
  467.  
  468. float        The number is displayed in normal, everyday notation, using
  469.         whatever precision is needed (or fits).
  470.  
  471. hidden        The number is not displayed.  It is recalculated, etc as
  472.         normal, but the cell is displayed as if it were empty.
  473.  
  474. graph        The number is displayed as a small graph.  If the number is
  475.         close to zero, it will be displayed as '0', If it is positive,
  476.         a row of '+'-es is displayed.  If it is negative, a row of
  477.         '-'-es is displayed.
  478.  
  479. user-1 through    These are the sixteen user-defined formats, as described
  480. user-16        below.
  481.  
  482. The following formats require a precision.  The precision may be a number
  483. from zero to 14, in which case that number of digits will always be displayed
  484. after the decimal point (zero-padding or rounding the number as needed), or
  485. the precision may be 'float', in which case oleo will use as many digits as
  486. necessary.  As examples:
  487.  
  488.     dollar.2            display like ``$1,769.00''
  489.     general.float                "    "   ``1769.00032''    
  490.  
  491.  
  492.  
  493. general        This uses either normal or scientific notation, depending on
  494.         the magnitude of the number and the width of the column.
  495.  
  496. dollar        Positive values are preceeded by '$', (so 3 is displayed as
  497.         '$3').  Negative values are parenthasized (so -3 is displayed
  498.         as '($3)'), and all large values have a ',' every three
  499.         digits (so 1000 is displayed as '$1,000'.
  500.  
  501. comma        Positive numbers are not preceede by '$', but this is
  502.         otherwise identical to 'dollar'.
  503.  
  504. percent        The value is multiplied by 100, and is displayed with a
  505.         trailing '%'.  Thus .01 displays as '1%', while 1 displays as
  506.         '100%'.
  507.  
  508. fixed        The number is displayed in normal, everyday notation, using
  509.         the precision specified.  'fixed.float' is the same as
  510.         'float'.  'fixed.0' is the same as 'integer'.
  511.  
  512. exponent    The number is displayed in scientific notation.
  513.  
  514.  
  515.         User-defined numeric formats:
  516.  
  517. You can set up to sixteen user-defined numeric formats:
  518.  
  519. The current parts of a format are:
  520. (Using the 'dollar' format for an example.)
  521.  
  522.     Example:    What it is:
  523.     $        What to print before postive numbers.
  524.     (        What to print before negative numbers.
  525.             What to print after positive numbers.
  526.     )        What to print after negative numbers.
  527.     $0        What to print if the number is zero.
  528.     ,        What to print between the thousands and the
  529.             hundreds, etc.
  530.     .        What to print for a decimal point.
  531.  
  532.     0-14 or float    The number of digits to print after the decimal point.
  533.             'float' means use however many digits are needed, or
  534.             however many will fit, whichever is less. . .
  535.  
  536.     any-number    What to multiply the value by before printing.
  537.             Most often this will be one, but it might be 100 if
  538.             you're printing percentages, or .000001 if you're
  539.             printing in megabucks.  (Beware of overflow!)
  540.  
  541. Do not use digits for the headers, trailers, the comma, or the decimal point
  542. symbol.  Using digits will confuse the internal routines and produce
  543. incomprehensible results. . .  (Should the set-user-format command check its
  544. input for validity?)
  545.  
  546.             Other Cell Formatting Options:
  547.  
  548. Values in a cell may be displayed aligned flush with either the left or right
  549. edges of the cell, or centered in the cell.  The default is left-aligned.
  550.  
  551. The width of a column of cells may be set to any non-negative value.  A value
  552. of zero means that cells in that column won't be displayed, and the normal
  553. cursor-motion commands will skip over those cells.  However, you can position
  554. the cursor on a non-displayed cell by using the goto-cell command.
  555.  
  556. If the width of a column is wider than the display, it is displayed as if it
  557. were the width of the display.
  558.  
  559.  
  560.             Currently Supported Options:
  561.  
  562. (no)a0        In a0 mode, Oleo uses {letters}{digits} style cell-references,
  563.         like some popular spreadsheets.
  564.         In noa0 mode, Oleo uses R{digits}C{digits} style references,
  565.         like some other popular spreadsheets.
  566.  
  567. (no)auto    In auto mode, cells whose values may have chaged are
  568.         automatically recalculated.  In noauto mode, cells are only
  569.         recalculated when the recalculate command is used.
  570.  
  571. (no)background    In background mode, automatic recalculation is done while
  572. (no)bkgrnd    the spreadsheet waits for you to type a key (and stops while
  573.         the key is being handled).  In nobackground mode, oleo
  574.         performs all its recalculation before listening for
  575.         keystrokes. . .
  576.  
  577. (no)backup    In backup mode, whenever the spreadsheet writes out a file,
  578.         if the file already exists, a backup copy is made (like
  579.         emacs).
  580.  
  581. (no)bkup_copy    In nobackup mode bkup_copy is ignored.  In bkup_copy mode,
  582.         backup files are made by copying the original file, instead of
  583.         renaming it.
  584.  
  585. ticks (number)    This value controls how often should rnd(), cell(), my(),
  586.         curcell(), etc cells get updated.  This value is in seconds
  587.         (???).  The initial value is 10 seconds.
  588.  
  589. print (number)    This is the width of the page for the print command.  The
  590.         initial value is the width of the screen.
  591.  
  592. file (format-name) If -DUSE_DLD was defined, format-name may be any .o file
  593.         that contains definitions for the appropriate functions, or
  594.         'panic', which is the only file format that oleo will have
  595.         compiled into it.  If -DUSE_DLD was not defined, format-name
  596.         must be one of sylk, sc, panic, or list, and oleo will have
  597.         to be re-compiled before any other formats may be used.
  598.  
  599. load (file-name) This option is only avaliable if oleo was compiled with
  600.         -DUSE_DLD.  This option loads in a .o file of spreadsheet
  601.         functions, keyboard commands, and/or keymaps.  Spreadsheet
  602.         functions and keyboard commands must be loaded in before they
  603.         can be used in expressiond or bound to keys.
  604.  
  605. status (number)    This option controls which line on the screen is used for
  606.         displaying the status of the current cell.  The number may be
  607.         positive, (counting down from the top), negative (counting up
  608.         from the bottom, or zero (disabling the status line).
  609.  
  610. input (number)    This option controls which line on the screen is used for
  611.         reading lines of text.  The number may be positive (counting
  612.         down from the top), or negative (counting up from the
  613.         bottom), but not zero.
  614.         
  615. The following options affect the currently active window:
  616.  
  617. (no)page    Basically, in page mode, whenever a paticular cell is
  618.         displayed in the window, it will always be in the same
  619.         location on the screen.  In page mode, the recenter command
  620.         acts just like the redraw-screen command.
  621.  
  622. (no)pageh    These options turns on or off page mode only in
  623. (no)pagev    the horizontal or vertical axis.
  624.  
  625. link (wnum)    This option 'links' the current window with the one
  626.         specified.  A window may only be linked to one other window
  627.         at a time.  When a window is linked to another one, whenever
  628.         the cell cursor in the first window is moved, the cursor in
  629.         the other window moves as well.  (unless the cursor in other
  630.         window is locked from moving in that diretion.)
  631.  
  632.         (Should linking to a window force that window to link
  633.         back?  That might make life easier for naive users.)
  634.  
  635. nolink        This removes the link (if any) on the current window.
  636. unlink
  637.  
  638. (no)lockh    These options prevent the cell cursor in the current window
  639. (no)lockv    from moving in the horizontal or vertical direction, but only
  640.         when the cell cursor is moved in a window that this one is
  641.         linked.
  642.  
  643.  
  644. (no)edges    In edges mode oleo displays Row and Column numbers at the top
  645.         and left edges of the window.  Perhaps edges should be split
  646.         into edgeh and edgev?
  647.  
  648. (no)standout    In standout mode, the edges (see (no)edges) are drawn in
  649.         standout mode (reverse video, usually).
  650.  
  651.  
  652. Options supported by the list file format:
  653.  
  654. list ch        Use the character CH to separate the cell values.
  655.  
  656.  
  657.         File names:
  658.  
  659. If a file name begins with a '|', the rest of the name is taken as a command,
  660. which oleo opens a pipe to.  So you can use the name '|zcat file.Z' to read
  661. a compressed spreadsheed, or '|compress > file.Z' to write one.
  662.  
  663.  
  664.              Using Oleo with X11
  665.  
  666. If your system has libX11, Oleo will be built with X support.  If you run
  667. Oleo with the DISPLAY environment variable set, Oleo will open an X window 
  668. instead of using curses.
  669.  
  670. Under X, cells are normally displayed in the default font.  You can
  671. change that font using the set-default-font command.  The value you
  672. specify may include wild cards, especially for the point size of the
  673. font.  You can change the font used for specific areas of a
  674. spreadsheet using the commands `set-cell-font' and `set-region-font'.
  675.  
  676.              Font Specifications
  677.  
  678. The easiest way to specify a font is to use one of the built in
  679. short-hand names.  These names are `fixed', `times', and `courier'.
  680. Optionally, these names can be followed by a scale.  The scale is the
  681. ratio of the default point size to the desired point size. For
  682. example, if the default font is a 10 point font, then `times 1.2'
  683. refers to a 12 point Times-Roman type font.
  684.  
  685. Every font has a long name that can also be used in specifications.
  686. The long name has three parts: an X name, a PostScript(*) name, and a
  687. scale.  The X name and PostScript may be omitted.  The shorthand name
  688. `times 1.2' is the same as the long name:
  689.  
  690.     *times-medium-r-*, Times-Roman, 1.2
  691.  
  692. Notice that the size is left wildcarded in the X name.  This is not
  693. absolutely necessary, but if it is done Oleo can resize the font
  694. should the size of the default font change (the command
  695. set-default-point-size does this).
  696.  
  697. New short hand names can be defined using the `define-font-name'
  698. command.  Later, if a user uses a shorthand name in a font
  699. specification, the name is replace by the text of the definition.  For
  700. example, here is a standard definition from init.c:
  701.  
  702.     define-font-name time *times-medium-r-*, Times-Roman
  703.  
  704. Notice that the scale has been omitted.  That is so that
  705. specifications like `times 1.2' will be properly expanded.
  706.  
  707.         X resources and command line options.
  708.  
  709. Oleo doesn't yet recognize and .Xdefault resources or X specific
  710. command line options.  It will in a future release.
  711.  
  712.  
  713. (*) PostScript is a trademark of Adobe Systems Incorporated.
  714.  
  715.  
  716.              PostScript Printing
  717.  
  718.  
  719. Oleo can generate an embedded postScript redition of any part of a
  720. spreadsheet.  Using the commands outlined in `Using Oleo with X11',
  721. you can control the fonts used in the printed output.
  722.  
  723. The command `psprint-region' takes a range and file name as arguments.
  724. It writes embedded postScript to the file.  
  725.  
  726. Oleo will make the output as large as possible to fit the page.  You
  727. can change the page size using the command `set-page-size'.  For
  728. example, the default setting is `set-page-size 8.5 x 11'.  To specify
  729. a page size in centimeters, use: `set-page-size 20 x 30 c'.
  730.  
  731. The command `set-default-ps-font' controls the default font for cells.
  732. For example, the initial value is `set-default-ps-font Times-Roman'.
  733.  
  734.  
  735.             Formulae:
  736.  
  737. Numbers must be entered in 'general' format:
  738.     [-]digits[.digits][e[-]digits]
  739.  
  740. Strings are entered surrounded by double-quotes.  To include unusual
  741. characters, you can either use \char (works well for ") or use
  742. \nnn where nnn is the octal code for the character you want to include.
  743.  
  744.             Magic constants:
  745.  
  746. Note that oleo automatically converts the names of constants to upper case,
  747. but they can be entered in any case.
  748.  
  749. #TRUE            The logical TRUE value
  750. #FALSE            The logical FALSE value
  751.  
  752. #ERROR            Various error types.
  753. #BAD_INPUT
  754. #NON_NUMBER
  755. #NON_STRING
  756. #NON_BOOL
  757. #NON_RANGE
  758. #OUT_OF_RANGE
  759. #NO_VALUES
  760. #DIV_BY_ZERO
  761. #BAD_NAME
  762. #NOT_AVAIL
  763. #PARSE_ERROR
  764. #NEED_OPEN
  765. #NEED_CLOSE
  766. #NEED_QUOTE
  767. #UNK_CHAR
  768. #UNK_FUNC
  769.  
  770. #INF            Various trancendental values.  On some machines,
  771. #INFINITY        (like the vax), these may all be the same value.
  772. #NAN
  773. #NOT_A_NUMBER
  774. #NINF
  775. #MINUS_INFINITY
  776.  
  777.  
  778.             Infix functions:
  779.  
  780. - num            0-num
  781. ! bool            #TRUE if bool is #FALSE
  782.             #FALSE if bool is #TRUE, error otherwise.
  783.  
  784. num1 ^ num2        Exponentiation  This is *right* associative!
  785. num1 * num2        Multiplication  Note that these functions are not as
  786. num1 / num2        Division    good as they should be at detecting
  787. int1 % int2        Modulus        overflow.  There *is* code that should
  788.  
  789. num1 + num2        Addition    force integer expressions to become
  790. num1 - num2        subtraction    floating-point if the result wouldn't
  791.                     fit in an integer.
  792. num1 >= num2        Arithmatic greater-or-equal
  793. num1 > num2        greater-than
  794. num1 < num2        less-than
  795. num1 <= num2        less-than-or-equal
  796.  
  797. val1 = val2        #TRUE if val1 and val2 can be considered equal.
  798.             #FALSE otherwise
  799. val1 != val2        Equivelent to !(val1=val2)
  800.  
  801. str1 & str2        Text concatination.
  802.  
  803. bool ? val1 : val2    if(bool==#TRUE)
  804.                 evaluate val1
  805.             else if(bool!=#FALSE)
  806.                 error...
  807.             else
  808.                 evaluate val2.
  809.  
  810. ( val )            (To override default precedence) Note that since oleo
  811.             stores expressions in a byte-compiled form, excess
  812.             parens will mysteriously vanish.
  813.  
  814.  
  815.         Prefix functions:
  816.  
  817. In 'a0' mode, all prefix functions have '@' prepended to their names.
  818.  
  819. if(bool,val1,val2)    if(test==#TRUE)
  820.                 evaluate val1
  821.             else if(test!=#FALSE)
  822.                 error...
  823.             else
  824.                 evaluate val2.
  825. and(bool1,bool2)    if(val1==#FALSE)
  826.                 #FALSE
  827.             else if(val1!=#TRUE)
  828.                 error...
  829.             else val2;
  830. or(bool1,bool2)        if(val1==#TRUE)
  831.                 #TRUE
  832.             else if(val1!=#FALSE)
  833.                 error...
  834.             else val2;
  835. pi()            3.14159265358979326848
  836. row()            The row number of the cell the expression is in.
  837. col()            The column number of the cell the expression is in.
  838. now()            The current time in seconds since Jan 1 1970 (?)
  839. abs(num)        The absolute value of num.
  840. acos(num)        The arc-cosine of num (num in radians)
  841. asin(num)        The arc-sine of num (num in radians)
  842. atan(num)        The arc-tangent of num (in radians)
  843. int(num)        Convert to integer (toward zero)
  844. ceil(num)        Convert to integer (round up)
  845. floor(num)        Convert to integer (round down)
  846. cos(num)        The cosine of num (in radians)
  847. dtr(num)        num degrees in radians
  848. exp(num)        The exponential function of num
  849. log(num)        The natural log of num
  850. log10(num)        The log of num to base 10
  851. rtd(num)        num radians in degrees
  852. sin(num)        The sine (in radians) of num
  853. sqrt(num)        The square-root of num
  854. tan(num)        The tangent (in radians) of num
  855. rnd(num)        A random number from 0 to num-1
  856. negate(num)        0-num
  857. not(bool)        #TRUE if bool is #FALSE
  858.             #FALSE if bool is #TRUE, error otherwise.
  859. iserr(val)        #TRUE if the expression is an error
  860.             else #FALSE
  861. isnum(val)        #TRUE if the expression is a number, or can be
  862.             automatically converted into a number, thus
  863.             isnum("12") is #TRUE, while isnum("12 ") is
  864.             #FALSE. (This might be worth fixing.)
  865. rows(rng)        number of rows in rng.
  866. cols(rng)        number of columns in rng.
  867. ctime(num)        Convert num into a readable date/time string.
  868. atan2(num1,num2)    Two number arctangent
  869. hypot(num1,num2)    use man 2 hypot
  870. fixed(num1,num2)    num1 rounded to num2 decimal places
  871.  
  872. index(rng,int)        the contents of the int-th cell in rng.
  873. index(rng,num1,num2)    The contents of the int1-th down and int2-th
  874.             over cell in rng
  875. oneof(int,val1,val2,val3...) switch(int) {
  876.                 case 1: val1;
  877.                 case 2: val2;
  878.                 ...
  879.                 default: error;
  880.             }
  881.  
  882. For the following functions, arguments that are ranges are scanned
  883. for numeric values only.  Strings, error values, empty cells, etc, are ignored.
  884. All these functions except cnt() will give a #NO_VALUES error if it does not
  885. find any numbers.  You can give most of the functions an explicit value if
  886. you don't want to get a #NO_VALUES error.  For example, if you want to add
  887. up the range r1:20c5, and return 0 if there are no numbers there,
  888. 'sum(0,r1:20c5)' will work.
  889.  
  890. Strings, etc, that are explicitly given to the functions are subjected to the
  891. usual conversion.
  892.  
  893. sum(vr1...)        ...
  894. prod(vr1...)        ...
  895. avg(vr1...)        ...
  896. std(vr1...)        The SAMPLE standard deviation.  To get the population
  897.             standard deviation, use sqrt(var(...))
  898. max(vr1...)        ...
  899. min(vr1...)        ...
  900. cnt(vr1...)        The number of numeric values found.
  901. var(vr1...)        The POPULATION variance.  To get the sample variance,
  902.             use std(...)^2
  903.  
  904. These functions are in the 'string' package.  If oleo is compiled with
  905. -DUSE_DLD, the string package must be loaded before these functions can be
  906. used.  If a spreadsheet that uses these functions is loaded before the
  907. string package is loaded, things will fail (silently!)  (This is probably a
  908. bug.
  909.  
  910. len(str)        length of string in characters.
  911. strupr(str)        string converted to upper case
  912. strlwr(str)        string converted to lower case
  913. strcap(str)        string with each word capitalized.
  914. trim(str)        string with extra spaces and non-ascii chars
  915.             removed.
  916. find(str1,str2,int)    return the location where str2 appears in
  917.             str1, start looking at character #int
  918. substr(int1,int2,str)    The characters in string from position int1
  919.             to position int2.  Positions can be either
  920.             positive (First character is #1, last char is
  921.             #(length of string)) or negative(last
  922.             character is #-1, first character is #-(length
  923.             of string)).
  924. mid(str,int1,int2)    The characters in string from int1 (counting
  925.             from the beginning) continuing for int2 chars.
  926. edit(str,int1,int2,...)    Remove the text from int1 to int2 in string
  927.             and replace it with ... (zero or more strings)
  928.             int1 and int2 are like for substr() above.
  929. repeat(int,str)        str repeated int times, thus repeat(2,"foo")
  930.             returns "foofoo"
  931. concat(vr1,...)        Concatinate strings, ranges, etc.
  932.  
  933.  
  934. These functions are in the 'cells' package.  If oleo is compiled with
  935. -DUSE_DLD, the cells package must be loaded before these functions can be
  936. used.
  937. my(str)            String:        Returns:
  938.             row        row()
  939.             column        col()
  940.             width        The width of the column containing
  941.                     this cell.
  942.             lock        "locked" or "unlocked"
  943.             protection    ditto
  944.             justify        "left" "right" "center" or "default"
  945.             alignment    ditto
  946.             format        "default" "user-1" etc.
  947.             fmt        ditto.
  948.             type        "error", "boolean", "float",
  949.                     "integer", "null", "Unknown",
  950.                     etc.
  951.             formula        A string of the cell's current
  952.                     formula.
  953.             value        The cells current value.
  954.             anything-else    error--> #BAD_INPUT
  955.  
  956. curcell(str)        Like my(), but for the cell under the
  957.             cell-cursor in the current window.
  958.  
  959. cell(int1,int2,str)    Like my(), but for the cell at Rint1Cint2.
  960.  
  961. member(rng,val)        The number of the first cell in RNG that contains
  962.             VAL, or zero if no cells contain it.
  963.  
  964.  
  965. These next four functions could probably be replaced by a pair of smart
  966. regex routines. . .
  967.  
  968. smember(rng,str)    The number of the first cell in RNG that contains a
  969.             substring of STR, or zero if no cell contains one.
  970.  
  971. members(rng,str)    The number of the first cell in RNG whose value is
  972.             a substring of STR.
  973.  
  974. pmember(rng,str)    The number of the first cell in RNG whose value
  975.             equals the first few characters of STR.
  976.  
  977. memberp(rng,str)    The number of the first cell in RNG whose value
  978.             starts with STR.
  979.  
  980. hlookup(rng,num,int)    Scan through the top row of RANGE looking for a
  981.             number which is greater than NUM.  Then return the
  982.             value in the cell that is INT rows down from the top
  983.             of the range.
  984.  
  985. vlookup(rng,num,int)    Like hlookup, but scans the left column
  986.             and returns the value in the cell that is INT
  987.             columns over from the left edge of the range.
  988.  
  989. vlookup_str(rng,num,str)Like vlookup, but scans the left column
  990.             for a string.  The column need not be sorted.
  991.  
  992. These functions are in the 'busi' package.  If oleo is compiled with
  993. -DUSE_DLD, the busi package must be loaded before these functions can be
  994. used.
  995.  
  996. pmt(p,r,t)        Payment per period for a loan of $P at rate R for T
  997.     payments.
  998.  
  999. pv(pmt,int,term)    Present value of an investment that pays $PMT at the
  1000.     end of each of TERM periods with a discount rate (interest) of INT.
  1001.  
  1002. npv(rng,rate)        Net Present Value of an investment which will pay
  1003.     uneaven payments.  The term is calculated from the number of cells in
  1004.     RNG.  .
  1005.  
  1006. irr(rng,guess)        Internal Rate of Return.  This function is paticularly
  1007.     untested, and should not be trusted.
  1008.  
  1009. fv(pmt,int,term)    Future Value of an annuity.
  1010.  
  1011. rate(fut,pres,term)    Interest rate required to turn $PRES into $FUT in
  1012.     TERM periods.
  1013.  
  1014. term(pmt,int,fut)    Number of periods required to collect $FUT in
  1015.     payments of $PMT, where depositd payments earn at a rate of INT.
  1016.  
  1017. cterm(int,fut,pres)    Number of periods required to collect $FUT from a
  1018.     single initial deposit of $PRES, at an interest rate of INT.
  1019.  
  1020. sln(cost,scrap,life)    Straight line depreciation of an asset that cost
  1021.     $COST when new, can be sold for $SCRAP, and will last for LIFE
  1022.     periods.
  1023.  
  1024. syd(cost,scrap,life,per)    Sum-of-the-digits depreciation of an asset
  1025.     that cost $COST, can be sold for $SCRAP and lasts LIFE, in period PER.
  1026.  
  1027. ddb(cost,scrap,life,per)    Double-declining-balance deprecion, otherwise
  1028.     similar to syd().
  1029.  
  1030. anrate(pmt,pres,term)    
  1031. anterm(pmt,prin,rate)
  1032. balance(prin,rate,term,period)
  1033. paidint(prin,rate,term,period)
  1034. kint(prin,rate,term,period)
  1035. kprin(prin,rate,term,period)
  1036. compbal(print,rate,term)
  1037.